import { NextFunction, Request, Response } from 'express';
import { Injectable, NestMiddleware } from '@nestjs/common';

@Injectable()
export class UserInfoMiddleware implements NestMiddleware {
    use(req: Request, res: Response, next: NextFunction) {
        Object.assign(req.body, req.cookies || {});
        next();
    }
}
